#-------------------------------------------------------
from shapes import *
world = TurtleWorld()
q = Turtle()
q.delay = 0
#---------------------Functions-------------------------
def sword(t,size=20):
	blade(t, size)
	handguard(t, size)
	handle(t, size)
def blade(t, size=10):
	print "Blade"
	t.fd(size*28)
	t.rt()
	t.fd(size*2)
	t.rt()
	t.fd(size*28)
	move(t, 0, size*-2)
	coor=(t.x,t.y)
	arc(t, size*2.0, 90.9, 90)
	t.fd(size*2)
	move(t, size*-30, size*1)
	line(t, size*28, 0)
	(t.x,t.y)=coor
	move(t, size*0, size*-1.5)
	arc(t, size*2.5, 53.9, 90)
def handguard(t, size=10):
	print "Hand Guard"
	move(t, size*-27, size*1.5)
	t.rt()
	t.fd(size*2)
	t.rt()
	t.fd(size*2)
	t.rt()
	t.fd(size*6)
	t.rt()
	t.fd(size*2)
	t.rt()
	t.fd(size*2)
def handle(t, size=10):
	print "Handle"
	t.rt()
	move(t, size*2, size*0)
	rect(t, size*15, size*2)
	line(t, size*2, size*2)
	line(t, size*2, size*-2)
	line(t, size*2, size*2)
	line(t, size*2, size*-2)
	line(t, size*2, size*2)
	line(t, size*2, size*-2)
	line(t, size*2, size*2)
	line(t, size*1, size*-1)
	line(t, size*-1, size*-1)
	line(t, size*-2, size*2)
	line(t, size*-2, size*-2)
	line(t, size*-2, size*2)
	line(t, size*-2, size*-2)
	line(t, size*-2, size*2)
	line(t, size*-2, size*-2)
	line(t, size*-2, size*2)
	move(t, size*15, size*-2)
	square(t, size*2)	
#-----------------------Test----------------------------
sword (q)
wait_for_user()